<?php

/**
 * Description of utils
 *
 * @author Kishore
 */
class utils {
    
    public function sendMail($emai) {
        
        // get email configuration
        $config = Config::getConfig("email");

        $emailHost = $config['emailhost'];
        $emailPort = $config['emailport'];
        $emailUser = $config['emailuser'];
        $emailPass = $config['emailpass'];
    }
    
    public function addControl($ctlName, $type) {
        
        switch ($type) {
            case 'text':
                $htmlCtrlName = htmlspecialchars($ctlName);
                echo <<<EOT
                <input type='text' name='$ctlName' value='$htmlCtrlName'>
EOT;
                break;
            case 'label':
                echo "<label for id='lbl$ctlName'>$ctlName</label>";
                break;
        }
        
    }
    
}

